#ifndef TOWERBASE2_H
#define TOWERBASE2_H

#include <QObject>
#include<QPoint>
#include<QPixmap>
#include"enemy2.h"
#include<QTimer>
#include<bullet2.h>
#include<QSize>
class window4;
class towerbase2:QObject
{
    Q_OBJECT
public:
    towerbase2(QPoint pos, window4 *game2,QPixmap);
    void draw(QPainter * painter);
    void attack_enemy();
    void choose_enemy(Enemy2 *enemy);

    void lose_sight();
    void check_enemy_range();
    virtual int show_firerate();
    virtual int show_damage();
    virtual int show_firerange();
    void target_killed();
public slots:
    void shoot_bulluet();
private:
    QPoint Tower_pos;
    int Attack_range;
    int Tower_damage;
    int Attack_speed;
    QPixmap _Pic;
    window4* game2;
    Enemy2 * _choose_enemy;
    QTimer * _fireRate;
    int fire_time;
    double mrotationpixmap;
    QSize ms_fixedSize;
signals:

};
#endif // TOWERBASE2_H
